package com.ly.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.ly.bean.Bis_coupon_active;
import com.ly.bean.Bis_coupon_record;

public interface CouponActiveMapper {
	@SuppressWarnings("rawtypes")
	public List<Map> querycouponactive(Bis_coupon_active active);
	
	//点击删除按钮之后修改active表中的状态改为已删除  修改record表中的未兑换状态改为已失效
	@Update("update bis_coupon_active set is_del=1 where active_id=#{active_id}")
	public void updatestatus(Integer active_id);
	@Update("update bis_coupon_record set status=3 where active_id=#{active_id} and status=1")
	public void updaterecord(Integer active_id);
	
	public void insert(Bis_coupon_active active);	
	public void insertrecord(Bis_coupon_record record);
	
	@Select("select MAX(active_id) from bis_coupon_active")
	public Integer querymaxid();	
	public Integer querycounts();
	
	public void updateRecordStatus(int recordId);
	
	public List<Bis_coupon_record> selectOldRecord(int hasDay);
	
	
}
